Skip to content

Fix - Visibility conditions not working on tree cascade dropdown questions#30

Merged
Rom1-B merged 4 commits into
mainfrom
fix/tree-cascade-dropdown-visibility-conditions
Jul 6, 2026
Merged

Fix - Visibility conditions not working on tree cascade dropdown questions#30
Rom1-B merged 4 commits into
mainfrom
fix/tree-cascade-dropdown-visibility-conditions

Conversation

@RomainLvr

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !44659
  • Here is a brief description of what this PR does

ItemAsTextConditionHandler uses getName() which returns only the item's own name. For tree dropdowns, a child item's name does not include its ancestors, so a condition like "contains Parent" always failed. Fixed by introducing TreeCascadeItemAsTextConditionHandler in the plugin, which uses completename ("Parent > Child") for CommonTreeDropdown items. TreeCascadeDropdownQuestion::getConditionHandlers() is overridden to substitute this handler.

@RomainLvr RomainLvr requested a review from stonebuzz June 17, 2026 12:19
@RomainLvr RomainLvr self-assigned this Jun 17, 2026
@RomainLvr

Copy link
Copy Markdown
Contributor Author

I have the customer test it

@stonebuzz stonebuzz requested a review from ccailly June 24, 2026 15:28
Comment thread src/Model/ConditionHandler/TreeCascadeItemAsTextConditionHandler.php Outdated
@RomainLvr RomainLvr requested a review from stonebuzz June 26, 2026 08:02
@stonebuzz

Copy link
Copy Markdown

awaiting custoemrs feedback

@Rom1-B Rom1-B merged commit 932e6f7 into main Jul 6, 2026
3 checks passed
@Rom1-B Rom1-B deleted the fix/tree-cascade-dropdown-visibility-conditions branch July 6, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants